package pers.vinsonws.jianghu.serverspring.repositories;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import pers.vinsonws.jianghu.serverspring.entity.ChatRooms;
import pers.vinsonws.jianghu.serverspring.entity.Users;

import java.util.List;
import java.util.Set;

/**
 * @auther vinsonws
 * @date 2018/10/30 20:34
 */
@Repository
public interface ChatRoomsRepository extends JpaRepository<ChatRooms, Integer> {

    List<ChatRooms> findAll();
    Set<ChatRooms> findAllByUsers(Users users);
    ChatRooms findById(int id);
}
